package com.jz.community.basecomm.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;


/**
 * 基类通用定位信息
 */
public class BaseCommLocateInfo implements Serializable, Parcelable {
    private static final long serialVersionUID = 1L;
    public String name;
    public int id;
    @SerializedName("first_spell")
    public String firstSpell;
    public String lat;
    public String lon;
    public String com_lat;
    public String com_lon;
    public String city;
    public String citycode;
    @SerializedName("address")
    public String address;
    @SerializedName("area")
    public String area;

    @SerializedName("areaCode")
    public String areaCode;

    @SerializedName("provinceName")
    public String provinceName;

    @SerializedName("provinceCode")
    public String provinceCode;
    public String No;
    @SerializedName("snippet")
    public String snippet;
    public BaseCommLocateInfo() {

    }

    public BaseCommLocateInfo(String name, String firstSpell, int id, String lon, String lat, String com_lat, String com_lon, String provinceName, String provinceCode, String city, String citycode, String address,
                              String area, String areaCode, String No) {
        this.name = name;
        this.firstSpell = firstSpell;
        this.id = id;
        this.lon = lon;
        this.lat = lat;
        this.com_lat = com_lat;
        this.com_lon = com_lon;
        this.provinceName = provinceName;
        this.provinceCode = provinceCode;
        this.city = city;
        this.citycode = citycode;
        this.address = address;
        this.area = area;
        this.areaCode = areaCode;
        this.No = No;
    }

    @Override
    public String toString() {
        return "BaseCommLocateInfo{" +
                "name='" + name + '\'' +
                ", id=" + id +
                ", firstSpell='" + firstSpell + '\'' +
                ", lat='" + lat + '\'' +
                ", lon='" + lon + '\'' +
                ", com_lat='" + com_lat + '\'' +
                ", com_lon='" + com_lon + '\'' +
                ", city='" + city + '\'' +
                ", citycode='" + citycode + '\'' +
                ", address='" + address + '\'' +
                ", area='" + area + '\'' +
                ", areaCode='" + areaCode + '\'' +
                ", provinceName='" + provinceName + '\'' +
                ", provinceCode='" + provinceCode + '\'' +
                ", No='" + No + '\'' +
                ", snippet='" + snippet + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeInt(this.id);
        dest.writeString(this.firstSpell);
        dest.writeString(this.lon);
        dest.writeString(this.lat);
        dest.writeString(this.com_lat);
        dest.writeString(this.com_lon);
        dest.writeString(this.provinceName);
        dest.writeString(this.provinceCode);
        dest.writeString(this.city);
        dest.writeString(this.citycode);
        dest.writeString(this.address);
        dest.writeString(this.area);
        dest.writeString(this.areaCode);
        dest.writeString(this.No);
        dest.writeString(this.snippet);
    }

    protected BaseCommLocateInfo(Parcel in) {
        this.name = in.readString();
        this.id = in.readInt();
        this.firstSpell = in.readString();
        this.lon = in.readString();
        this.lat = in.readString();
        this.com_lat = in.readString();
        this.com_lon = in.readString();
        this.provinceName = in.readString();
        this.provinceCode = in.readString();
        this.city = in.readString();
        this.citycode = in.readString();
        this.address = in.readString();
        this.area = in.readString();
        this.areaCode = in.readString();
        this.No = in.readString();
        this.snippet = in.readString();
    }

    public static final Creator<BaseCommLocateInfo> CREATOR = new Creator<BaseCommLocateInfo>() {
        @Override
        public BaseCommLocateInfo createFromParcel(Parcel source) {
            return new BaseCommLocateInfo(source);
        }

        @Override
        public BaseCommLocateInfo[] newArray(int size) {
            return new BaseCommLocateInfo[size];
        }
    };
}
